﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Utilities
{
    /// <summary>
    /// 
    /// </summary>
    public class Job
    {
        #region Properties

        /// <summary>
        /// The task to be executed when the job runs
        /// </summary>
        public TaskBase Main { get; set; }

        /// <summary>
        /// The results of the last task that ran
        /// </summary>
        public TaskData Result { get; set; }

        /// <summary>
        /// What to execute in case of errors if the task does not handle
        /// </summary>
        public TaskBase OnError { get; set; }

        #endregion

        public void Run(TaskData input)
        {
            Main.Run(this, input);
        }
    }
}
